package com.amazon.ags.client;

import com.amazon.ags.api.ErrorCode;
import com.amazon.ags.api.RequestResponse;

public class RequestResponseImp
  implements RequestResponse
{
  private ErrorCode errorCode;
  private int responseCode;
  private Object[] userData;

  public RequestResponseImp(int paramInt)
  {
    this.responseCode = paramInt;
    this.errorCode = ErrorCode.NONE;
  }

  public RequestResponseImp(int paramInt, ErrorCode paramErrorCode)
  {
    if (paramErrorCode == null)
      throw new IllegalArgumentException("errorCode must be non-null.");
    this.responseCode = paramInt;
    this.errorCode = paramErrorCode;
  }

  public final ErrorCode getError()
  {
    return this.errorCode;
  }

  public int getEventType()
  {
    return 0;
  }

  public final int getResponseCode()
  {
    return this.responseCode;
  }

  public final Object[] getUserData()
  {
    return this.userData;
  }

  public final boolean isError()
  {
    return getError().isError();
  }

  protected final void setError(ErrorCode paramErrorCode)
  {
    this.errorCode = paramErrorCode;
  }

  protected final void setResponseCode(int paramInt)
  {
    this.responseCode = paramInt;
  }

  public final void setUserData(Object[] paramArrayOfObject)
  {
    this.userData = paramArrayOfObject;
  }

  public String toString()
  {
    String str = "ResponseCode: " + this.responseCode;
    if (this.errorCode != null)
      str = str + "\n ErrorCode: " + this.errorCode;
    if (this.userData != null)
      str = str + "\n " + this.userData.toString();
    return str + "\n requestType: " + getEventType();
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.amazon.ags.client.RequestResponseImp
 * JD-Core Version:    0.6.2
 */